{extend name='common/_container'}
{block name="content"}
<div class="ibox float-e-margins">
    <div class="ibox-content">
        <div class="form-horizontal" id="CodeInfoForm">
            <div class="row">
                <div class="col-sm-12">
                    <!-- form start -->
                    <div class="form-group layui-form">
                        <label class="col-sm-2 control-label">审核状态：</label>
                        <div class="col-sm-9">
                            <?php if(!isset($info['data'])){ $info['data'] = '0'; }; ?>
                            <input name="data" value="1" type="radio" {if condition="$info.data eq '1'"}checked{/if} title="开启">
                            <input name="data" value="0" type="radio" {if condition="$info.data eq '0'"}checked{/if} title="关闭">
                        </div>
                    </div>
                    <!-- form end -->
                </div>
            </div>
            <div class="hr-line-dashed"></div>
            <div class="row btn-group-m-t">
                <div class="col-sm-9 col-sm-offset-1">
                    <button type="button" class="btn btn-primary" onclick="CodeInfoDlg.update()" id="ensure">
                        <i class="fa fa-check"></i>&nbsp;保存
                    </button>
                </div>
            </div>
        </div>
    </div>
</div>
<script src="__PUBLIC__/static/js/upload.js" charset="utf-8"></script>
<script src="__PUBLIC__/static/js/plugins/layui/layui.js" charset="utf-8"></script>
<script src='__PUBLIC__/static/js/plugins/paixu/jquery-migrate-1.1.1.js'></script>
<script src='__PUBLIC__/static/js/plugins/paixu/jquery.dragsort-0.5.1.min.js'></script>
<script>
    layui.use(['form'], function () {
    });
    laydate.render({elem: '#createtime', type: 'datetime', trigger: 'click'});
    var CodeInfoDlg = {
        CodeInfoData: {},
        validateFields: {}
    }

    CodeInfoDlg.collectData = function () {
    };

    CodeInfoDlg.update = function () {
        this.clearData();
        this.collectData();
        if (!this.validate()) {
            return;
        }
        var ajax = new $ax(Feng.ctxPath + "/SysAudit/update", function (data) {
            if ('00' === data.status) {
                Feng.success(data.msg, 1000);
            } else {
                Feng.error(data.msg + "！", 1000);
            }
        })
        var data = $("input[name = 'data']:checked").val();
        ajax.set('data', data);
        ajax.set(this.CodeInfoData);
        ajax.start();
    };


</script>
<script src="__PUBLIC__/static/js/base.js" charset="utf-8"></script>
{/block}
